package com.blacktea.behavioralpatterns.iteratorpattern;

import java.util.Iterator;
import java.util.List;

/**
 * @description:
 * @author: black tea
 * @date: 2023/3/25 16:09
 */
public class MyArrayList<T> implements MyCollection<T> {

    private List<T> list;


    public MyArrayList(List<T> list) {
        this.list = list;
    }

    @Override
    public Iterator<T> iterator() {
        return list.iterator();
    }
}
